import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
// 引入vant
import Vant from 'vant';
import 'vant/lib/index.css';
Vue.use(Vant);

// //播放器相关
import VideoPlayer from 'vue-video-player'
import 'vue-video-player/src/custom-theme.css'
import 'video.js/dist/video-js.css'
Vue.use(VideoPlayer)

// import Video from 'video.js'
// import 'video.js/dist/video-js.css'
// Vue.prototype.$video = Video

import axios from 'axios';
import VueAxios from 'vue-axios'
import Web3 from 'web3'

Vue.use(VueAxios, axios)
Vue.prototype.Web3 = Web3


//  引入iconfont
import "./assets/fonts/iconfont.css"


// 引入amfe-flexible
import 'amfe-flexible/index'


import VueI18n from 'vue-i18n'
Vue.use(VueI18n)
const i18n = new VueI18n({
  locale:(function(){
    if(localStorage.getItem('lang')){
      return localStorage.getItem('lang')
    }
    return 'en'
  }()),
  messages:{
    'en':require('./i18n/langs/en.js'), //英文语言包
    'zh':require('./i18n/langs/zh.js'), //中文繁体包
  }
})


import request from '@/utils/request'
// 挂在dapp插件
import Dapp from "./lib/dapp-plugin.min";
// const url = "https://ment.chssgy.net/prod/api";
const url = "https://localhost:8080/prod/api";
const dapp = new Dapp(url);
Vue.prototype.$dapp = dapp

Vue.prototype.$request = request
Vue.config.productionTip = false

new Vue({
	i18n,
  router,
  store,
  render: h => h(App)
}).$mount('#app')
